import { createApp } from 'vue'
import App from './App.vue'
// 引入 pinia
import { createPinia } from 'pinia'
// 引入 router
import router from './router'
// 引入 vant 消息通知 轮播图 宫格
import {
  Notify, Swipe, SwipeItem, Grid, GridItem, CountDown, Tabbar, TabbarItem, Image as VanImage, List, Empty, Divider, ActionBar, ActionBarIcon, ActionBarButton, Skeleton,SkeletonTitle,SkeletonImage,SkeletonAvatar,SkeletonParagraph,Button,Search,BackTop,SubmitBar,Toast,Popover,SwipeCell,Stepper,RadioGroup,Radio,Dialog, Checkbox, CheckboxGroup,Sidebar, SidebarItem
} from 'vant'


import 'amfe-flexible'
// import './assets/main.css'
import 'reset-css'

const pinia = createPinia()
const app = createApp(App)

app.use(pinia)
// 引入 router
// 引入之后
// 1. 在组件里可以使用
//  <router-link> 和 <router-view>
// 2. 在组件里可以使用
//  this.$router 和 this.$route 
app.use(router)

// vant组件注册
app.use(Notify)
app.use(Swipe)
app.use(SwipeItem)
app.use(Grid);
app.use(GridItem);
app.use(CountDown)
app.use(Tabbar);
app.use(TabbarItem);
app.use(VanImage);
app.use(List);
app.use(Empty);
app.use(Divider);
app.use(ActionBar);
app.use(ActionBarIcon);
app.use(ActionBarButton)
app.use(Skeleton);
app.use(SkeletonTitle);
app.use(SkeletonImage);
app.use(SkeletonAvatar);
app.use(SkeletonParagraph);
app.use(Button);
app.use(Search);
app.use(BackTop);
app.use(SubmitBar);
app.use(Toast);
app.use(Popover);
app.use(SwipeCell);
app.use(Stepper);
app.use(Radio);
app.use(RadioGroup);
app.use(Dialog);
app.use(Checkbox);
app.use(CheckboxGroup);
app.use(Sidebar);
app.use(SidebarItem);

app.mount('#app')
